<html>
<head>
</head>
<body>
<p><strong>Java implementation of CommonMark for parsing markdown and rendering to HTML (core library)</strong></p>
<p>Example:</p>
<pre><code class="java">import com.vladsch.flexmark.ast.Node;
import com.vladsch.flexmark.html.HtmlRenderer;
import com.vladsch.flexmark.parser.Parser;
import com.vladsch.flexmark.parser.ParserEmulationProfile;
import com.vladsch.flexmark.util.options.MutableDataSet;

class Main {
    static void main(String[] args) {
        MutableDataSet options = new MutableDataSet();
        //Optionally Select Emulation Profile: 
        //     COMMONMARK (default), FIXED_INDENT, KRAMDOWN, 
        //     MARKDOWN, GITHUB_DOC, MULTI_MARKDOWN, PEGDOWN
        // options.setFrom(ParserEmulationProfile.KRAMDOWN);
        
        // Optionally, tweak behavior
        options.set(HtmlRenderer.ESCAPE_HTML, true);
        
        Parser parser = Parser.builder(options).build();
        HtmlRenderer renderer = HtmlRenderer.builder(options).build();

        Node document = parser.parse(&quot;This is *Sparta*&quot;);
        renderer.render(document);  // &quot;&lt;p&gt;This is &lt;em&gt;Sparta&lt;/em&gt;&lt;/p&gt;\n&quot;
    }
}        
</code></pre>
<p>See the following packages for details:</p>
<ul>
  <li>{@link com.vladsch.flexmark.parser} for parsing input text to AST nodes</li>
  <li>{@link com.vladsch.flexmark.ast} for AST node types and visitors</li>
  <li>{@link com.vladsch.flexmark.html} for HTML rendering</li>
</ul>
</body>
</html>
